<?php
defined('SYS_RUN') or exit();

abstract class ACli {

    protected $params = array();

    /**
     * Cli object.
     * It saved here because class instance may be created with the command line arguments
     * @var object
     */
    public $cli;

    static $_instance = array();

    function __get($name) {
        if(!isset(self::$_instance[$name]))
            self::$_instance[$name] = Lib::get($name);
        return self::$_instance[$name];
    }

    protected function write($string) {
        $this->cli->write($string);
    }
}